<? 
$protectid="305"; 
include("../protect.php");

include_once("../../config.inc.php");

include_once(CFG_LIB_DIR.'mysqldb.inc.php');
$objDb = new mysqldb();

$id=$_GET['id'];
$state=$_GET["state"];
$page=$_GET['page'];
$sql="update `".con_strPREFIX."buycar` set Ispay='$state' where ID ='$id'";
//echo $sql;exit;
$blnResult=$objDb->query($sql);
if($blnResult){
	echo "<script>alert('操作成功');location.href='index.php$page';</script>";
}
else{
	echo "<script>alert('操作失败，请重试');history.go(-1);</script>";
}

?>